const express = require('express')
const router = express.Router()
const {addFavorite,removeFavorite}=require('../controller/favorite')
const authMiddleware = require('../middleware/index/authMiddleware')


//添加关注：

router.post('/:slug', authMiddleware, addFavorite)  //添加喜欢
router.delete('/:slug', authMiddleware, removeFavorite)  //取消喜欢




// 导出路由模块
module.exports = router